package cn.sxt.service.impl;

import cn.sxt.DataGridView;
import cn.sxt.domain.BillType;
import cn.sxt.mapper.BillTypeMapper;
import cn.sxt.service.BillTypeService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author  Mxb
 * @date  2020/5/19 15:46
 * @version 1.0
 */
//暴露服务注解
@Service
public class BillTypeServiceImpl implements BillTypeService {
    @Autowired
    private BillTypeMapper billTypeMapper;

    @Override
    public DataGridView findAllBillType() {
        // 全查询
        List<BillType> billTypes = billTypeMapper.selectList(null);
        return new DataGridView(Long.valueOf(billTypes.size()),billTypes);
    }
}
